 // 模拟数据
export function getAlertSummary() {
    return Promise.resolve([
      { key: 'critical', title: '危急告警', count: 12, diff: '+3', color: '#ffccc7' },
      { key: 'important', title: '重要告警', count: 28, diff: '-5', color: '#ffe7ba' },
      { key: 'minor', title: '次要告警', count: 45, diff: '+8', color: '#bae7ff' },
      { key: 'resolved', title: '已处理', count: 156, diff: '+12', color: '#d9f7be' }
    ])
  }
  
  export function getAlertList({ page = 1, pageSize = 10 }) {
    return Promise.resolve({
      total: 241,
      list: [
        {
          id: 1,
          time: '2024-01-18 14:23:45',
          level: '危急',
          type: 'CPU 使用率',
          target: '数据库服务器 DB-01',
          content: 'CPU使用率超过95%，持续5分钟',
          status: '处理中'
        },
        {
          id: 2,
          time: '2024-01-18 14:20:12',
          level: '重要',
          type: '内存使用',
          target: '应用服务器 APP-02',
          content: '内存使用率达到85%，需要关注',
          status: '未处理'
        },
        {
          id: 3,
          time: '2024-01-18 14:15:33',
          level: '次要',
          type: '网络延迟',
          target: '网络交换机 SW-03',
          content: '网络延迟超过100ms',
          status: '已解决'
        },
        {
            id: 4,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 5,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 6,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 7,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 8,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 9,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
            id: 10,
            time: '2024-01-18 14:15:33',
            level: '次要',
            type: '网络延迟',
            target: '网络交换机 SW-03',
            content: '网络延迟超过100ms',
            status: '已解决'
        },
        {
          id: 11,
          time: '2024-01-18 14:15:33',
          level: '次要',
          type: '网络延迟',
          target: '网络交换机 SW-03',
          content: '网络延迟超过100ms',
          status: '已解决'
        },
        {
          id: 12,
          time: '2024-01-18 14:15:33',
          level: '次要',
          type: '网络延迟',
          target: '网络交换机 SW-03',
          content: '网络延迟超过100ms',
          status: '已解决'
        },
        {
          id: 13,
          time: '2024-01-18 14:15:33',
          level: '次要',
          type: '网络延迟',
          target: '网络交换机 SW-03',
          content: '网络延迟超过100ms',
          status: '已解决'
        },
        {
          id: 14,
          time: '2024-01-18 14:15:33',
          level: '次要',
          type: '内存延迟',
          target: '网络交换机 SW-03',
          content: '网络延迟超过100ms',
          status: '已解决'
        }

     


      ]
    })
  }
  
  export function getAlertTrend() {
    return Promise.resolve({
      legend: ['危急', '重要', '次要'],
      xAxis: ['1-12', '1-13', '1-14', '1-15', '1-16', '1-17', '1-18'],
      series: [
        { name: '危急', data: [10, 12, 9, 11, 8, 10, 12] },
        { name: '重要', data: [30, 28, 25, 27, 24, 26, 28] },
        { name: '次要', data: [40, 42, 39, 41, 38, 40, 45] }
      ]
    })
  }
  
  export function getAlertTypePie() {
    return Promise.resolve({
      legend: ['CPU 使用率', '内存使用', '磁盘空间', '网络延迟', '服务状态'],
      series: [
        { value: 30, name: 'CPU 使用率' },
        { value: 25, name: '内存使用' },
        { value: 20, name: '磁盘空间' },
        { value: 15, name: '网络延迟' },
        { value: 10, name: '服务状态' }
      ]
    })
  }